length of directed path

n.有向路长度